class Agent(object):
    '''
    Used to represent a node in a network.
    '''

    def __init__(self, agentId):
        '''
        Constructor
        '''
        self.agentId = agentId
        
        self.prefOrder = []
        self.intrinsicUtilDict = {}
    
        self.overallUtilDict = {}   
        self.weight = 0.0
        self.inDegree = 0
        self.outDegree = 0
        
    def __str__(self):
        return "Id:" + str(self.agentId)
                #("AgentId: " + str(self.AgentId) + 
                #"  PrefOrder: " + str(self.PrefOrder) + 
                #"  IntrinsicUtilDict: " + str(self.IntrinsicUtilDict) + 
                #"  OverallUtil: " + str(self.OverallUtil))
    
    def __repr__(self):
        return "Id:" + str(self.agentId)
    
    def __eq__(self, other):
        if isinstance(other, Agent):
            return self.__repr__() == other.__repr__()
        else:
            return False